import re

s = 'Levi:1994,Sunny:1993'
pattern = r"(\w+):\d+"
# 如果是元组则只显示元组匹配内容信息
l = re.findall(pattern, s)
print(l)


regex = re.compile(pattern)
l = regex.findall(s)
print(l)
